﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsStatistics.aspx.cs" Inherits="Manage_Cms_NewsStatistics" %>


<html>
<head >
    <!--#include file="../js/html_head.inc"-->
    <link rel="stylesheet" type="text/css" href="../Themes/<%=ManageHelper.GetTheme()%>/style.css" />
</head>
<body>
<script type="text/javascript">
        $(document).ready(function(){
            $("#spanStarteTime").hide();
            $("#spanEndTime").hide();
               
            $("#StarteTime").bind("focus", function(){
              WdatePicker({isShowClear:false,readOnly:false})
              });
            
            $("#EndTime").bind("focus", function(){
              WdatePicker({isShowClear:false,readOnly:false})
              });
          
            $("#txtCreateTimeBegin").bind("focus", function(){
              WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:false})
              });
            $("#txtCreateTimeEnd").bind("focus", function(){
            WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:false})
            });
        });
        
        function toexcel()
        {
        
        window.location.href='NewsStatistics.aspx?act=toexcel&siteid=<%=siteid %>&begin=<%=begin==""?DateTime.Now.ToShortDateString():begin%>&end=<%=end==""?DateTime.Now.ToShortDateString():end%>';
        }
        
        
           
</script>

    <div class="column" style="width:100%;margin-left:10px;">
        <form method="post" action="?act=look" id="form1">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tbody>
                <tr class="summary-title" align="left">
                    <td align="left" style="padding-left: 10px;width:20%;" >
                        <img style="margin-right: 3px" src="/Manage/Pic/Icons/search.gif"  />搜索
                        时间：
                        <input name="begin" id="txtCreateTimeBegin" value="<%=begin==""?DateTime.Now.ToShortDateString():begin%>" type="text" class="Wdate" />
                        <!--从
                        到
                        <input name="end" id="txtCreateTimeEnd" value="<%=end==""?DateTime.Now.ToShortDateString():end%>" type="text" class="Wdate" />-->
                    </td>
                    <td>
                        <input type="radio" name="checktime" <%=checktype==2?"":"checked" %> value="1" />出版时间
                        <input type="radio" name="checktime" <%=checktype==2?"checked":""  %> value="2" />修改时间
                    </td>
                    <td style="padding-top: 5px;"  align="left">
                        <input  type="submit" value="查看" class="button" />
                        <input  type="button" value="导出为EXCEL" class="button" onclick="toexcel()" />
                        <input type="hidden" value="<%=siteid %>" name="siteid" />
                    </td>
                </tr>
            </tbody>
        </table>
</form>
        <div class="columntitle">
           <font>新闻</font>总数：<span style="font-weight:bold;color:Red"><%=total %></span>条</div>
        <table cellspacing="0" cellpadding="0" rules="all" align="center" border="0" id="MyDataGrid" style="border-width: 0px; width: 100%; border-collapse: collapse;">
            <tr class="summary-title" style="height: 25px">
                <td align="center" style="width:100px;">作者</td>
                <td align="left" style="width:500px;">矩形图</td>
                <td align="center" style="width:100px;">比例</td>
            </tr>
            <%
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    %>
                        <tr class="tdbg" onmouseover="this.className='tdbg-dark';" onmouseout="this.className='tdbg';" style="height: 25px;" align="left">
                            <td align="center" style="width:100px;"><%=dt.Rows[i][0]%></td>
                            <td align="left"  style="width:500px;"><div style="width:90%;background:#FFF1F3">
                            <span style="background:#F78637;width:<%=getPercent(Convert.ToInt32(dt.Rows[i]["c"]))%>px"></span></div></td>
                            <td style="width:100px;" align="center"><span style="font-weight:bold;color:Red"><%=dt.Rows[i][1]%></span>
                            条(<%=getnum(Convert.ToInt32(dt.Rows[i]["c"]))%>)</td>
                        </tr>
                    <%
                }
            %>
            
 
        </table>
    </div>
    
    
    
    
    
      <input type="hidden" id="txtSiteID" name="siteid" value="<%=siteid%>" />
</body>
</html>
